// 使用这个模块进行统一的api管理
import requests from './request.js'
import mockRequest from './mockRequest.js' //mock请求

// 1.首页三级分类  /api/product/getBaseCategoryList  GET  无参数
export const reqCategoryList = () => {
    // 发请求
    return requests({ url: '/product/getBaseCategoryList', method: 'get' })
}

// 2.mock请求 banner
export const mockreqBannerList = () => {
    return mockRequest.get("/banner")
}

//3.mock请求 floor
export const mockreqFloorList = () => {
    return mockRequest.get("/floor")
}

//4.serach 搜索商品  /api/list   POST   好多参数（N）
export const reqSearchList = (params) => {
    // 发请求
    return requests({
        url: '/list',
        method: 'post',
        data: params
    })
}